#ifndef _CAMERA_CAMERA_H_
#define _CAMERA_CAMERA_H_

#include "../Basis/ONB.h"
#include "../Geometry/Ray.h"

class Camera
{
public:
	Camera();
	Camera(const Camera& origin);

	Camera(Vector3 c, Vector3 gaze, Vector3 vup, float aperture, 
		float left, float right, float bottom, float top, 
		float distance);

	Ray getRay(float a, float b, float xi1, float xi2);

	void setCenter(Vector3 _center);
	void setGaze(Vector3 _gaze);
	void setVUp(Vector3 _up);
	void setDistance(float _d);
	void setAperture(float _aperture);
	void setTmin(float _tmin);
	void setTmax(float _tmax);

	Vector3 getCenter();
	Vector3 getGaze();
	Vector3 getVUp();
	float getDistance();
	float getAperture();
	float getTmin();
	float getTmax();

private:
	Vector3 center, corner, across, up;
	ONB uvw;
	float lens_radius;
	float u0, u1, v0, v1;
	float d;
	float tmin, tmax;
};

#endif